<html>
<head><meta charset="utf-8"><title>Creation of well-formed bounds for substs · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Creation.20of.20well-formed.20bounds.20for.20substs.html">Creation of well-formed bounds for substs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="233049134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Creation%20of%20well-formed%20bounds%20for%20substs/near/233049134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Creation.20of.20well-formed.20bounds.20for.20substs.html#233049134">(Apr 04 2021 at 02:19)</a>:</h4>
<p>In something like <code>type OtherItem =  Outer&lt;Inner&lt;bool&gt;&gt;</code>, where do we end up creating the <code>PredicateKind::WellFormed</code> bound for <code>Inner&lt;bool&gt;</code>?</p>



<a name="233049714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Creation%20of%20well-formed%20bounds%20for%20substs/near/233049714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Creation.20of.20well-formed.20bounds.20for.20substs.html#233049714">(Apr 04 2021 at 02:31)</a>:</h4>
<p>nvm, found it - <code>GenericArg.walk()</code> is used to iterate over all of the sub-types: <a href="https://github.com/rust-lang/rust/blob/2616ab1c57e2d69f989307389b27ee996ed82575/compiler/rustc_trait_selection/src/traits/wf.rs#L419-L423">https://github.com/rust-lang/rust/blob/2616ab1c57e2d69f989307389b27ee996ed82575/compiler/rustc_trait_selection/src/traits/wf.rs#L419-L423</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>